<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<% String contextRoot = request.getContextPath(); %>
<f:loadBundle basename="properties.messages" var="msg" />
<f:view>
<!doctype html>
<html>
<head>
	<%@ include file="include/meta.jsp" %>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>SISDEP : Sistema de Informaci<h:outputText value="#{msg.tilde_o}" />n de Espacio P<h:outputText value="#{msg.tilde_u}" />blico</title>
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="stylesheet" href="<%=contextRoot%>/css/validationEngine.jquery.css" type="text/css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/template.css" type="text/css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/normalize.css">
	<link rel="stylesheet" href="<%=contextRoot%>/css/uniform.css"> <!-- estilos formularios -->
	<link rel="stylesheet" href="<%=contextRoot%>/css/cuerpo.css">	
	<link rel="stylesheet" href="<%=contextRoot%>/css/richCustom.css">
</head>
<body>
	<div id="marco"> <!--inicio contenedor -->
		<div class="arriba-cuerpo"></div> <!-- Burrada pa ver borde redondo en IE -->
		<div class="cuerpo">
			<img src="<%=contextRoot%>/images/logos.png" />
			<div class="clear"></div>
			<!-- Menu y Usuario init() -->
			<%@ include file="include/menuUsuario.jsp"%>
			<!-- Menu y Usuario end() -->
			<div class="clear"></div>
			<!-- Formulario -->
			<div id="buscador">
				<h2>Apoyo Gesti<h:outputText value="#{msg.tilde_o}"/>n Social - Bandeja de entrada Administraci<h:outputText value="#{msg.tilde_o}"/>n de Sensibilizaci<h:outputText value="#{msg.tilde_o}"/>n</h2>
				<h:form id="sensibilizacionSearchForm">
					<div id="sensibilizacionSearchFormContainer" style="display: block;">
					
						<span class="left" >
							<label>Tipo de Sensibilizaci<h:outputText value="#{msg.tilde_o}"/>n<span class="asterisco">*</span></label> 
							<h:selectOneMenu id="idSensibilizacionTipo" styleClass="validate[required]" value="#{sensibilizacionController.sensibilizacionSearch.idSensibilizacionTipoStr}">
								<f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.sensitizationTypeList}"/>
							</h:selectOneMenu>
						</span>
						
						<span class="left" style="margin-left: 10%;">
							<label><h:outputText value="#{msg.tilde_A}"/>rea de Sensibilizaci<h:outputText value="#{msg.tilde_o}"/>n<span class="asterisco">*</span></label> 
							<h:selectOneMenu id="idArea" styleClass="validate[required]" value="#{sensibilizacionController.sensibilizacionSearch.idAreaStr}">
								<f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.SDEPAreaTypeList}"/>
							</h:selectOneMenu>
						</span>
						
						<span class="left" style="margin-left: 10%;"> 
							<label>C<h:outputText value="#{msg.tilde_o}" />digo</label> 
							<h:inputText id="codigo" size="7" styleClass="validate[custom[onlyNumberSp]]" maxlength="7"	value="#{sensibilizacionController.sensibilizacionSearch.codigo}" />
						</span> 

						<div class="clear"></div><br /> <br /> 

					</div>
					<!-- FIN CAMPOS DE BUSQUEDA -->

					<div class="clear" style="margin-left: 400px;"></div>
					<div class="clear"></div>
					(<span class="asterisco"> * </span>) : Campo Obligatorio
					<div class="clear"></div>

					<span class="left inline" style="margin-left: 0px;">
					<h:commandButton
							id="sensibilizacionSearchButton" type="submit" value="Buscar"
							ondblclick="return false;"
							action="#{sensibilizacionController.searchSensibilizacionByKey}">
					</h:commandButton>
					</span>
					
				</h:form>
				<div>
					<h:form id="sensibilizacionCreateForm">
						<span class="left inline" style="margin-left: 160px;"> 
							<h:commandButton
								id="createsensibilizacionButton" type="submit" value="Nuevo"
								ondblclick="return false;"
								action="#{sensibilizacionController.createSensibilizacion}">
							</h:commandButton>
						</span>
					</h:form>
				</div>
			</div>
			<!-- Fin formulario div buscador !!! -->
			<div class="clear"></div>
			<!-- Inicio Formulario de Resultados -->
			<div id="buscador">
				<h:form id="sensibilizacionResultsForm">
					<div class="clear"></div> <br /> <br />
					<label>Resultados de la Consulta de Sensibilizaci<h:outputText value="#{msg.tilde_o}" />n: </label>
					<rich:dataTable id="sensibilizacionData"
						styleClass="scrollerTable" headerClass="standardTable_Header"
						border="0" cellpadding="3" cellspacing="1"
						footerClass="standardTable_Header" rowKeyVar="rowIndex"
						rowClasses="tablamultiregistrotr1,tablamultiregistrotr2"
						onRowMouseOver="this.style.backgroundColor='#C0C0C0'"
						onRowMouseOut="this.style.backgroundColor='#FFFFFF'"
						var="sensibilizacionRow"
						value="#{sensibilizacionController.sensibilizacionListModel}"
						rows="10">
						<h:column>
							<f:facet name="header">
								<h:outputText value="EDITAR" />
							</f:facet>
							<a4j:commandLink id="updateSensibilizacion"
								styleClass="formTextLink" title="Ver Detalle..."
								action="#{sensibilizacionController.updateSensibilizacion}"
								reRender="groupTable">
								<f:param name="sensibilizacionDataIndex" value="#{rowIndex}" />
								<h:graphicImage value="/images/edit_icon.png"
									style="border: 0px solid #FFFFFF;" />
							</a4j:commandLink>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="codigo" />
							</f:facet>
							<h:outputText value="#{sensibilizacionRow.codigo}" />
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="fecha" />
							</f:facet>
							<h:outputText value="#{sensibilizacionRow.fecha}" />
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="direccion Residencia" />
							</f:facet>
							<h:outputText value="#{sensibilizacionRow.direccionResidencia}" />
						</h:column>
<%-- 						<h:column> --%>
<%-- 							<f:facet name="header"> --%>
<%-- 								<h:outputText value="establecimiento" /> --%>
<%-- 							</f:facet> --%>
<%-- 							<h:outputText value="#{sensibilizacionRow.establecimiento}" /> --%>
<%-- 						</h:column> --%>
<%-- 						<h:column> --%>
<%-- 							<f:facet name="header"> --%>
<%-- 								<h:outputText value="telefono" /> --%>
<%-- 							</f:facet> --%>
<%-- 							<h:outputText value="#{sensibilizacionRow.telefono}" /> --%>
<%-- 						</h:column> --%>
						<h:column>
							<f:facet name="header">
								<h:outputText value="estado" />
							</f:facet>
							<h:outputText value="#{sensibilizacionRow.estado}" />
						</h:column>
					</rich:dataTable>
					<h:panelGrid columns="1" styleClass="tablapaginacion"
						columnClasses="standardTable_ColumnCentered">
						<rich:datascroller id="sensibilizacionScroll"
							for="sensibilizacionData" fastStep="10"
							pageIndexVar="pageIndex" styleClass="scroller" maxPages="9">
							<f:facet name="first">
								<h:graphicImage url="/images/arrow-first.gif" />
							</f:facet>
							<f:facet name="last">
								<h:graphicImage url="/images/arrow-last.gif" />
							</f:facet>
							<f:facet name="previous">
								<h:graphicImage url="/images/arrow-previous.gif" />
							</f:facet>
							<f:facet name="next">
								<h:graphicImage url="/images/arrow-next.gif" />
							</f:facet>
							<f:facet name="fastforward">
								<h:graphicImage url="/images/arrow-ff.gif" />
							</f:facet>
							<f:facet name="fastrewind">
								<h:graphicImage url="/images/arrow-fr.gif" />
							</f:facet>
						</rich:datascroller>
					</h:panelGrid>
				</h:form>
			</div>
			<!-- Fin tabla -->
			<div class="clear"></div>
		</div><!-- Fin DIV CUERPO -->
		<div class="abajo-cuerpo"></div>
		<!-- Burrada pa ver borde redondo en IE -->
	</div>
	<!-- Fin contenedor -->
	<div class="footer"></div>
	<script src="<%=contextRoot%>/js/jquery/lib/jquery-1.7.2.min.js"></script>
	<script src="<%=contextRoot%>/js/script.js"></script>
	<script src="<%=contextRoot%>/js/jquery/lib/jquery.uniform.min.js"></script>
	<!-- formularios -->
	<script	src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine-es.js" type="text/javascript" charset="utf-8"></script>
	<script	src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine.js"	type="text/javascript" charset="utf-8"></script>
	<script src="<%=contextRoot%>/js/jquery.maskedinput-1.3.js"	type="text/javascript"></script>
	<script type="text/javascript" charset="utf-8">
		jQ(document).ready(function() {
			jQ("input, select, input:checkbox, input:radio, input:file").uniform();
			jQ("#sensibilizacionSearchForm").validationEngine('attach');
			jQ("#sensibilizacionSearchForm").bind("jqv.form.result", function(event, errorFound) {
				if (!errorFound)
					displayLoadingImage();
				});
		});
	</script>
	<%@ include file="include/validationStatus.jsp"%>
	<%@ include file="include/modalMessageWindow.jsp"%>
</body>
</html>
</f:view>
